package com.huluobo.a2202mvvm_im_douyindemo.db;

import androidx.room.Database;
import androidx.room.RoomDatabase;

import com.huluobo.a2202mvvm_im_douyindemo.bean.LoginBeanResult;
import com.huluobo.a2202mvvm_im_douyindemo.bean.Money;
import com.huluobo.a2202mvvm_im_douyindemo.bean.VideoListBeanResult;

/**
 * Created by LC on 2024/5/9.
 * 创建Room数据库,是一个抽象类,其中注解里entities 填的是表的class,version是数据库版本 exportSchema 是否可以导出
 * Room数据库本身是个抽象类,主要功能就是获取所有的Dao 方法也是抽象方法,只是获取dao
 */
@Database(entities = {LoginBeanResult.LoginBean.class, VideoListBeanResult.VideoListBean.class, Money.class},
        version = 2,
        exportSchema = false)
public abstract class AppDatabase extends RoomDatabase {
    public abstract UserDao getUserDao();

    public abstract VideoDao getVideoDao();

    public abstract MoneyDao getMoneyDao();
}
